Copyright: Embedded Listbox by Mark Gamber


Contents
Windows Help Embedded Listbox

(c)1993 by Mark Gamber

Actual documentation

Sample Listbox #1

Sample Listbox #2

Sample Listbox #3

About This File


About WinHelp Embedded Listbox
Windows Help Embedded Listbox

(c)1993 by Mark Gamber

About This File

This project may be freely distributed under the condition that none of the files listed below are removed from the compressed file. The contents of WHLISTBX.DLL may not be altered without explicit permission from the author. Upon using any portion of this project, the user agrees to indemnify and hold harmless the author and project files from any damage caused. If unable to comply, the user should destroy the software immediately.

Included Files:

WHLISTBX.DLL:	Embedded listbox driver file.

LBTEST.HLP:	This example and documentation help file.

LBTEST.HPJ:	WinHelp Project file to create LBTEST.HLP

LBTEST.RTF:	WinHelp Project source file to create LBTEST.HLP

LIST1.INI:	Baggage INI file for first listbox.

LIST2.INI:	Baggage INI file for second listbox.

LIST3.INI:	Baggage INI file for third listbox.

The author may be reached via the following services:

America Online:	PCA MarkG

Compuserve:	76450,2754

Internet:	pcamarkg@aol.com


Sample Listbox #1

Double-Click an Item


Sample Listbox #2

Double-Click an Item


Sample Listbox #3

Double-Click an Item


Windows Help Embedded Listbox

(c)1993 by Mark Gamber

Topic #1


Windows Help Embedded Listbox

(c)1993 by Mark Gamber

Topic #2


Windows Help Embedded Listbox

(c)1993 by Mark Gamber

Topic #3


Windows Help Embedded Listbox

(c)1993 by Mark Gamber

Topic #4


Windows Help Embedded Listbox

(c)1993 by Mark Gamber

Topic #5


Windows Help Embedded Listbox

(c)1993 by Mark Gamber

Topic #6


Windows Help Embedded Listbox

(c)1993 by Mark Gamber

Topic #7


Windows Help Embedded Listbox

(c)1993 by Mark Gamber

Topic #8


Windows Help Embedded Listbox

(c)1993 by Mark Gamber

Topic #9


Windows Help Embedded Listbox

(c)1993 by Mark Gamber

Topic #10


Windows Help Embedded Listbox

(c)1993 by Mark Gamber

Topic #11


Windows Help Embedded Listbox

(c)1993 by Mark Gamber

Topic #12


Windows Help Embedded Listbox

(c)1993 by Mark Gamber

Topic #13


Windows Help Embedded Listbox

(c)1993 by Mark Gamber

Topic #14


Windows Help Embedded Listbox

(c)1993 by Mark Gamber

Topic #15


Windows Help Embedded Listbox

(c)1993 by Mark Gamber

Topic #16


Windows Help Embedded Listbox

(c)1993 by Mark Gamber

Topic #17


Windows Help Embedded Listbox

(c)1993 by Mark Gamber

Topic #18


Windows Help Embedded Listbox

(c)1993 by Mark Gamber

Topic #19


Windows Help Embedded Listbox

(c)1993 by Mark Gamber

Topic #20


Actual Docs
Windows Help Embedded Listbox

(c)1993 by Mark Gamber

Actual Documentation

This Winhelp file demonstrates the WHListbx control by Mark Gamber. It may be added to any Windows Help file with minimal effort by including the {ewx} statement in the Help source (RTF) file and providing an instruction file via a baggage file.

To add the control to the RTF file, simply include a reference to the control, specifying the baggage file it should use for initialization. For example, the first listbox in this file uses the file list1.ini so it's embedded into the help file using [ewl whlistbx.dll,whlistbx,list1.ini]. The second listbox is the same with the exception of the baggage file which is list2.ini. Note that the "ewl" command shown above has square brackets when, in fact, they should be "{" and "}". This was done only to prevent the listbox from appearing here. Don't use square brackets when you really want a listbox to appear!

Baggage files are used by the listbox to initialize themselves and are very easy to construct and include in the Help Project file (HPJ). A baggage file is an INI type file broken into three sections: Initialization, Items and Topics.


[INIT] Section
Windows Help Embedded Listbox

(c)1993 by Mark Gamber

Baggage Initialization Section

Each listbox uses a baggage file for initialization and control. The baggage file is an INI file which contains an initialization section (INIT) which much contain the following information:

[INIT]	Identifies this section as the initialization section

Xsize=#	Specifies the horizontal size of the listbox

Ysize=#	Specifies the vertical size of the listbox

FGColor=#	Specifies the foreground color  (0-16777215)

BGColor=#	Specifies the background color (0-16777215)

Items=#	How many items specified in ITEMS section

FontHeight=#	Height of font to use in the listbox

FontWeight=#	Weight of listbox font  (400-normal, 800=bold, etc)

FaceName=font	Name of font to use in listbox. (MS Sans Serif, etc)

For example, the INIT section for the first listbox in this file is as follows:

[INIT]

Xsize=240

Ysize=100

FGColor=0

BGColor=16776960

Items=20

FontHeight=8

FontWeight=700

FaceName=MS Sans Serif


[ITEMS] and [TOPICS]
Windows Help Embedded Listbox

(c)1993 by Mark Gamber

Items and Topics Sections

Each listbox uses a baggage file for item display and where to jump in the help file if an item is double-clicked upon. The first section, ITEMS, contains the text displayed for each listbox element, the number of elements specified in the INIT section by the Items identifier. When the listbox is created, it scans this section, reading each line and adding it to the listbox. The ITEMS list must start with List1 and continue unbroken.

Along with the ITEMS section is a matching TOPICS section which tells the listbox where to direct the WinHelp file when an element is double-clicked upon. Each topic is identified by it's Topic Mapping number, the map numbers defined in the Help Project file's [MAP] section. The TOPICS list must begin with Topic1 and continue unbroken to the last topic number.

For example, here is the ITEMS and TOPICS sections for the first listbox appearing in the Windows Help file:

[ITEMS]	[TOPICS]

List1=Jump To Topic #1	Topic1=101

List2=Jump To Topic #2	Topic2=102

List3=Jump To Topic #3	Topic3=103

List4=Jump To Topic #4	Topic4=104

List5=Jump To Topic #5	Topic5=105

List6=Jump To Topic #6	Topic6=106

List7=Jump To Topic #7	Topic7=107

List8=Jump To Topic #8	Topic8=108

List9=Jump To Topic #9	Topic9=109

List10=Jump To Topic #10	Topic10=110

List11=Jump To Topic #11	Topic11=111

List12=Jump To Topic #12	Topic12=112

List13=Jump To Topic #13	Topic13=113

List14=Jump To Topic #14	Topic14=114

List15=Jump To Topic #15	Topic15=115

List16=Jump To Topic #16	Topic16=116

List17=Jump To Topic #17	Topic17=117

List18=Jump To Topic #18	Topic18=118

List19=Jump To Topic #19	Topic19=119

List20=Jump To Topic #20	Topic20=120


{ewx} Directive
Windows Help Embedded Listbox

(c)1993 by Mark Gamber

{ewx} Windows Help Embedded Windows

A  window such as this listbox control may be embedded within a Windows Help using a directive added to the RTF source text. The syntax of  the command is as follows:

{ew[lcr] filename.dll,winclass,data}

lcr: Determines if the window is left, center or right aligned.

filename.dll: Filename of the DLL with the embedded window. In this case "whlistbx.dll"

winclass: Classname of the embedded window. In this case, "WHListbx".

data: Whatever data the author specified. In this case, the filename of the baggage file.